﻿<%@ Page Language="C#" MasterPageFile="../main.master" Inherits="VioletDevelopmentLaboratory.Net.Web.Configuration.VWebConfigManagerPage" %>

<script runat="server">
	protected void HealthMonitoringDetailsView_ItemUpdated(object sender, DetailsViewUpdatedEventArgs e)
	{
		ShowAlert_DetailsView_ItemUpdated(e);
	}





	
	
	
	protected void BufferModesGridView_SelectedIndexChanging(object sender, GridViewSelectEventArgs e)
	{
		BufferModesDetailsView.ChangeMode(DetailsViewMode.ReadOnly);
	}

	protected void BufferModesDetailsView_ItemInserted(object sender, DetailsViewInsertedEventArgs e)
	{
		ShowAlert_DetailsView_ItemInserted(e);

		BufferModesGridView.SelectedIndex = -1;
		BufferModesGridView.DataBind();
	}

	protected void BufferModesDetailsView_ItemUpdated(object sender, DetailsViewUpdatedEventArgs e)
	{
		ShowAlert_DetailsView_ItemUpdated(e);

		BufferModesGridView.SelectedIndex = -1;
		BufferModesGridView.DataBind();
	}

	protected void BufferModesDetailsView_ItemDeleted(object sender, DetailsViewDeletedEventArgs e)
	{
		ShowAlert_DetailsView_ItemDeleted(e);

		BufferModesDetailsView.ChangeMode(DetailsViewMode.Insert);
		
		BufferModesGridView.SelectedIndex = -1;
		BufferModesGridView.DataBind();
	}











	protected void EventMappingsGridView_SelectedIndexChanging(object sender, GridViewSelectEventArgs e)
	{
		EventMappingsDetailsView.ChangeMode(DetailsViewMode.ReadOnly);
	}

	protected void EventMappingsDetailsView_ItemInserted(object sender, DetailsViewInsertedEventArgs e)
	{
		ShowAlert_DetailsView_ItemInserted(e);

		EventMappingsGridView.SelectedIndex = -1;
		EventMappingsGridView.DataBind();
	}

	protected void EventMappingsDetailsView_ItemUpdated(object sender, DetailsViewUpdatedEventArgs e)
	{
		ShowAlert_DetailsView_ItemUpdated(e);

		EventMappingsGridView.SelectedIndex = -1;
		EventMappingsGridView.DataBind();
	}

	protected void EventMappingsDetailsView_ItemDeleted(object sender, DetailsViewDeletedEventArgs e)
	{
		ShowAlert_DetailsView_ItemDeleted(e);

		EventMappingsDetailsView.ChangeMode(DetailsViewMode.Insert);

		EventMappingsGridView.SelectedIndex = -1;
		EventMappingsGridView.DataBind();
	}

	protected void ProfilesGridView_SelectedIndexChanging(object sender, GridViewSelectEventArgs e)
	{
		ProfilesDetailsView.ChangeMode(DetailsViewMode.ReadOnly);
	}

	protected void ProfilesDetailsView_ItemInserted(object sender, DetailsViewInsertedEventArgs e)
	{
		ShowAlert_DetailsView_ItemInserted(e);

		ProfilesGridView.SelectedIndex = -1;
		ProfilesGridView.DataBind();
	}

	protected void ProfilesDetailsView_ItemUpdated(object sender, DetailsViewUpdatedEventArgs e)
	{
		ShowAlert_DetailsView_ItemUpdated(e);

		ProfilesGridView.SelectedIndex = -1;
		ProfilesGridView.DataBind();
	}

	protected void ProfilesDetailsView_ItemDeleted(object sender, DetailsViewDeletedEventArgs e)
	{
		ShowAlert_DetailsView_ItemDeleted(e);

		ProfilesDetailsView.ChangeMode(DetailsViewMode.Insert);
		
		ProfilesGridView.SelectedIndex = -1;
		ProfilesGridView.DataBind();
	}

	
	
	
	
	
	protected void RulesGridView_SelectedIndexChanging(object sender, GridViewSelectEventArgs e)
	{
		RulesDetailsView.ChangeMode(DetailsViewMode.ReadOnly);
	}

	protected void RulesDetailsView_ItemInserted(object sender, DetailsViewInsertedEventArgs e)
	{
		ShowAlert_DetailsView_ItemInserted(e);

		RulesGridView.SelectedIndex = -1;
		RulesGridView.DataBind();
	}

	protected void RulesDetailsView_ItemUpdated(object sender, DetailsViewUpdatedEventArgs e)
	{
		ShowAlert_DetailsView_ItemUpdated(e);

		RulesGridView.SelectedIndex = -1;
		RulesGridView.DataBind();
	}

	protected void RulesDetailsView_ItemDeleted(object sender, DetailsViewDeletedEventArgs e)
	{
		ShowAlert_DetailsView_ItemDeleted(e);

		RulesDetailsView.ChangeMode(DetailsViewMode.Insert);

		RulesGridView.SelectedIndex = -1;
		RulesGridView.DataBind();
	}
</script>

<asp:Content ID="Content1" ContentPlaceHolderID="BodyContentPlaceHolder" runat="server">

	<h2>HealthMonitoring</h2>

	<div>
		<asp:ObjectDataSource ID="HealthMonitoringDetailsViewDataSource" runat="server" 
			SelectMethod="GetHealthMonitoringSection" 
			TypeName="VioletDevelopmentLaboratory.Net.Web.Configuration.HealthMonitoringSectionManager" 
			UpdateMethod="Modify">
			<UpdateParameters>
				<asp:Parameter Name="enabled" Type="Boolean" />
				<asp:Parameter Name="heartbeatInterval" Type="Object" />
			</UpdateParameters>
		</asp:ObjectDataSource>
		<fieldset>
			<legend>healthMonitoring</legend>
			<asp:DetailsView ID="HealthMonitoringDetailsView" runat="server" CellPadding="5" 
							AutoGenerateRows="False" DataSourceID="HealthMonitoringDetailsViewDataSource" 
							DefaultMode="Edit" onitemupdated="HealthMonitoringDetailsView_ItemUpdated">
				<Fields>
					<asp:CheckBoxField DataField="Enabled" HeaderText="Enabled" 
						SortExpression="Enabled" />
					<asp:BoundField DataField="HeartbeatInterval" HeaderText="HeartbeatInterval" 
						SortExpression="HeartbeatInterval" />
					<asp:CommandField ButtonType="Button" ShowCancelButton="False" 
						ShowEditButton="True" />
				</Fields>
			</asp:DetailsView>
		</fieldset>
	</div>


	<div style="margin-left : 30px">
		<asp:ObjectDataSource ID="ProvidersGridViewDataSource" runat="server" 
			SelectMethod="GetProviders" 
			TypeName="VioletDevelopmentLaboratory.Net.Web.Configuration.HealthMonitoringSectionManager"></asp:ObjectDataSource>
		<fieldset>
			<legend>providers</legend>
			<asp:GridView ID="ProvidersGridView" runat="server" CellPadding="5" 
							AutoGenerateColumns="False" DataKeyNames="Name" 
							DataSourceID="ProvidersGridViewDataSource">
				<Columns>
					<asp:BoundField DataField="Name" HeaderText="Name" SortExpression="Name" />
					<asp:BoundField DataField="Type" HeaderText="Type" SortExpression="Type" />
					<asp:BoundField DataField="ConnectionStringName" 
						HeaderText="ConnectionStringName" SortExpression="ConnectionStringName" />
					<asp:BoundField DataField="Bcc" HeaderText="Bcc" SortExpression="Bcc" />
					<asp:BoundField DataField="BodyFooter" HeaderText="BodyFooter" 
						SortExpression="BodyFooter" />
					<asp:BoundField DataField="BodyHeader" HeaderText="BodyHeader" 
						SortExpression="BodyHeader" />
					<asp:CheckBoxField DataField="Buffer" HeaderText="Buffer" 
						SortExpression="Buffer" />
					<asp:BoundField DataField="BufferMode" HeaderText="BufferMode" 
						SortExpression="BufferMode" />
					<asp:BoundField DataField="Cc" HeaderText="Cc" SortExpression="Cc" />
					<asp:BoundField DataField="CommandTimeout" HeaderText="CommandTimeout" 
						SortExpression="CommandTimeout" />
					<asp:CheckBoxField DataField="DetailedTemplateErrors" 
						HeaderText="DetailedTemplateErrors" SortExpression="DetailedTemplateErrors" />
					<asp:BoundField DataField="From" HeaderText="From" SortExpression="From" />
					<asp:BoundField DataField="MaxEventDetailLength" 
						HeaderText="MaxEventDetailLength" SortExpression="MaxEventDetailLength" />
					<asp:BoundField DataField="MaxEventLengthForSimpleMessage" 
						HeaderText="MaxEventLengthForSimpleMessage" 
						SortExpression="MaxEventLengthForSimpleMessage" />
					<asp:BoundField DataField="MaxSizeForSimpleMessage" 
						HeaderText="MaxSizeForSimpleMessage" SortExpression="MaxSizeForSimpleMessage" />
					<asp:BoundField DataField="MaxEventCountForTemplateMessage" 
						HeaderText="MaxEventCountForTemplateMessage" 
						SortExpression="MaxEventCountForTemplateMessage" />
					<asp:BoundField DataField="MaxMessagesPerNotification" 
						HeaderText="MaxMessagesPerNotification" 
						SortExpression="MaxMessagesPerNotification" />
					<asp:BoundField DataField="Priority" HeaderText="Priority" 
						SortExpression="Priority" />
					<asp:BoundField DataField="Separator" HeaderText="Separator" 
						SortExpression="Separator" />
					<asp:BoundField DataField="SmtpAddresses" HeaderText="SmtpAddresses" 
						SortExpression="SmtpAddresses" />
					<asp:BoundField DataField="SubjectPrefix" HeaderText="SubjectPrefix" 
						SortExpression="SubjectPrefix" />
					<asp:BoundField DataField="Template" HeaderText="Template" 
						SortExpression="Template" />
					<asp:BoundField DataField="To" HeaderText="To" SortExpression="To" />
				</Columns>
				<SelectedRowStyle BackColor="SkyBlue" />
			</asp:GridView>
		</fieldset>
	</div>


	<div style="margin-left : 30px">
		<asp:ObjectDataSource ID="BufferModesDetailsViewDataSource" runat="server" 
			DeleteMethod="RemoveBufferMode" InsertMethod="AddBufferMode" 
			SelectMethod="GetBufferModeSettings" 
			TypeName="VioletDevelopmentLaboratory.Net.Web.Configuration.HealthMonitoringSectionManager" 
			UpdateMethod="ModifyBufferMode">
			<DeleteParameters>
				<asp:Parameter Name="name" Type="String" />
			</DeleteParameters>
			<UpdateParameters>
				<asp:Parameter Name="name" Type="String" />
				<asp:Parameter Name="maxBufferSize" Type="Int32" />
				<asp:Parameter Name="maxFlushSize" Type="Int32" />
				<asp:Parameter Name="urgentFlushThreshold" Type="Int32" />
				<asp:Parameter Name="regularFlushInterval" Type="Object" />
				<asp:Parameter Name="urgentFlushInterval" Type="Object" />
				<asp:Parameter Name="maxBufferThreads" Type="Int32" />
			</UpdateParameters>
			<SelectParameters>
				<asp:ControlParameter ControlID="BufferModesGridView" Name="name" 
					PropertyName="SelectedValue" Type="String" />
			</SelectParameters>
			<InsertParameters>
				<asp:Parameter Name="name" Type="String" />
				<asp:Parameter Name="maxBufferSize" Type="Int32" />
				<asp:Parameter Name="maxFlushSize" Type="Int32" />
				<asp:Parameter Name="urgentFlushThreshold" Type="Int32" />
				<asp:Parameter Name="regularFlushInterval" Type="Object" />
				<asp:Parameter Name="urgentFlushInterval" Type="Object" />
				<asp:Parameter Name="maxBufferThreads" Type="Int32" />
			</InsertParameters>
		</asp:ObjectDataSource>
		<asp:ObjectDataSource ID="BufferModesGridViewDataSource" runat="server" 
			SelectMethod="GetBufferModeSettingsCollection" 
			TypeName="VioletDevelopmentLaboratory.Net.Web.Configuration.HealthMonitoringSectionManager"></asp:ObjectDataSource>
		<fieldset>
			<legend>bufferModes</legend>
			<asp:DetailsView ID="BufferModesDetailsView" runat="server" CellPadding="5" 
							AutoGenerateRows="False" DataKeyNames="Name" 
							DataSourceID="BufferModesDetailsViewDataSource" DefaultMode="Insert" 
							oniteminserted="BufferModesDetailsView_ItemInserted" 
							onitemupdated="BufferModesDetailsView_ItemUpdated" 
							onitemdeleted="BufferModesDetailsView_ItemDeleted">
				<Fields>
					<asp:BoundField DataField="Name" HeaderText="Name" ReadOnly="True" 
						SortExpression="Name" />
					<asp:BoundField DataField="MaxBufferSize" HeaderText="MaxBufferSize" 
						SortExpression="MaxBufferSize" />
					<asp:BoundField DataField="MaxFlushSize" HeaderText="MaxFlushSize" 
						SortExpression="MaxFlushSize" />
					<asp:BoundField DataField="UrgentFlushThreshold" 
						HeaderText="UrgentFlushThreshold" SortExpression="UrgentFlushThreshold" />
					<asp:BoundField DataField="UrgentFlushInterval" 
						HeaderText="UrgentFlushInterval" SortExpression="UrgentFlushInterval" />
					<asp:BoundField DataField="RegularFlushInterval" 
						HeaderText="RegularFlushInterval" SortExpression="RegularFlushInterval" />
					<asp:BoundField DataField="MaxBufferThreads" HeaderText="MaxBufferThreads" 
						SortExpression="MaxBufferThreads" />
					<asp:CommandField ButtonType="Button" ShowDeleteButton="True" 
						ShowEditButton="True" ShowInsertButton="True" />
				</Fields>
			</asp:DetailsView>
			<asp:GridView ID="BufferModesGridView" runat="server" CellPadding="5" 
							AutoGenerateColumns="False" DataKeyNames="Name" 
							DataSourceID="BufferModesGridViewDataSource" 
							onselectedindexchanging="BufferModesGridView_SelectedIndexChanging">
				<Columns>
					<asp:CommandField ShowSelectButton="True" />
					<asp:BoundField DataField="Name" HeaderText="Name" SortExpression="Name" />
					<asp:BoundField DataField="MaxBufferSize" HeaderText="MaxBufferSize" 
						SortExpression="MaxBufferSize" />
					<asp:BoundField DataField="MaxFlushSize" HeaderText="MaxFlushSize" 
						SortExpression="MaxFlushSize" />
					<asp:BoundField DataField="UrgentFlushThreshold" 
						HeaderText="UrgentFlushThreshold" SortExpression="UrgentFlushThreshold" />
					<asp:BoundField DataField="UrgentFlushInterval" 
						HeaderText="UrgentFlushInterval" SortExpression="UrgentFlushInterval" />
					<asp:BoundField DataField="RegularFlushInterval" 
						HeaderText="RegularFlushInterval" SortExpression="RegularFlushInterval" />
					<asp:BoundField DataField="MaxBufferThreads" HeaderText="MaxBufferThreads" 
						SortExpression="MaxBufferThreads" />
				</Columns>
				<SelectedRowStyle BackColor="SkyBlue" />
			</asp:GridView>
		</fieldset>
	</div>


	<div style="margin-left : 30px">
		<asp:ObjectDataSource ID="EventMappingsDetailsViewDataSource" runat="server" 
			DeleteMethod="RemoveEventMapping" InsertMethod="AddEventMapping" 
			SelectMethod="GetEventMappingSettings" 
			TypeName="VioletDevelopmentLaboratory.Net.Web.Configuration.HealthMonitoringSectionManager" 
			UpdateMethod="ModifyEventMapping">
			<DeleteParameters>
				<asp:Parameter Name="name" Type="String" />
			</DeleteParameters>
			<UpdateParameters>
				<asp:Parameter Name="name" Type="String" />
				<asp:Parameter Name="type" Type="String" />
				<asp:Parameter Name="startEventCode" Type="Int32" />
				<asp:Parameter Name="endEventCode" Type="Int32" />
			</UpdateParameters>
			<SelectParameters>
				<asp:ControlParameter ControlID="EventMappingsGridView" Name="name" 
					PropertyName="SelectedValue" Type="String" />
			</SelectParameters>
			<InsertParameters>
				<asp:Parameter Name="name" Type="String" />
				<asp:Parameter Name="type" Type="String" />
				<asp:Parameter Name="startEventCode" Type="Int32" />
				<asp:Parameter Name="endEventCode" Type="Int32" />
			</InsertParameters>
		</asp:ObjectDataSource>
		<asp:ObjectDataSource ID="EventMappingsGridViewDataSource" runat="server" 
			SelectMethod="GetEventMappingSettingsCollection" 
			TypeName="VioletDevelopmentLaboratory.Net.Web.Configuration.HealthMonitoringSectionManager"></asp:ObjectDataSource>
		<fieldset>
			<legend>eventMappings</legend>
			<asp:DetailsView ID="EventMappingsDetailsView" runat="server" CellPadding="5" 
							AutoGenerateRows="False" DataKeyNames="Name" 
							DataSourceID="EventMappingsDetailsViewDataSource" DefaultMode="Insert" 
							oniteminserted="EventMappingsDetailsView_ItemInserted" 
							onitemupdated="EventMappingsDetailsView_ItemUpdated" 
							onitemdeleted="EventMappingsDetailsView_ItemDeleted">
				<Fields>
					<asp:BoundField DataField="Name" HeaderText="Name" ReadOnly="True" 
						SortExpression="Name" />
					<asp:BoundField DataField="Type" HeaderText="Type" SortExpression="Type" />
					<asp:BoundField DataField="StartEventCode" HeaderText="StartEventCode" 
						SortExpression="StartEventCode" />
					<asp:BoundField DataField="EndEventCode" HeaderText="EndEventCode" 
						SortExpression="EndEventCode" />
					<asp:CommandField ShowDeleteButton="True" ShowEditButton="True" 
						ShowInsertButton="True" ButtonType="Button" />
				</Fields>
			</asp:DetailsView>
			<asp:GridView ID="EventMappingsGridView" runat="server" CellPadding="5" 
							AutoGenerateColumns="False" DataKeyNames="Name" 
							DataSourceID="EventMappingsGridViewDataSource" 
							onselectedindexchanging="EventMappingsGridView_SelectedIndexChanging">
				<Columns>
					<asp:CommandField ShowSelectButton="True" />
					<asp:BoundField DataField="Name" HeaderText="Name" SortExpression="Name" />
					<asp:BoundField DataField="Type" HeaderText="Type" SortExpression="Type" />
					<asp:BoundField DataField="StartEventCode" HeaderText="StartEventCode" 
						SortExpression="StartEventCode" />
					<asp:BoundField DataField="EndEventCode" HeaderText="EndEventCode" 
						SortExpression="EndEventCode" />
				</Columns>
				<SelectedRowStyle BackColor="SkyBlue" />
			</asp:GridView>
		</fieldset>
	</div>


	<div style="margin-left : 30px">
		<asp:ObjectDataSource ID="ProfilesDetailsViewDataSource" runat="server" 
			DeleteMethod="RemoveProfile" InsertMethod="AddProfile" 
			SelectMethod="GetProfileSettings" 
			TypeName="VioletDevelopmentLaboratory.Net.Web.Configuration.HealthMonitoringSectionManager" 
			UpdateMethod="ModifyProfile">
			<DeleteParameters>
				<asp:Parameter Name="name" Type="String" />
			</DeleteParameters>
			<UpdateParameters>
				<asp:Parameter Name="name" Type="String" />
				<asp:Parameter Name="minInstances" Type="Int32" />
				<asp:Parameter Name="maxLimit" Type="Int32" />
				<asp:Parameter Name="minInterval" Type="Object" />
			</UpdateParameters>
			<SelectParameters>
				<asp:ControlParameter ControlID="ProfilesGridView" Name="name" 
					PropertyName="SelectedValue" Type="String" />
			</SelectParameters>
			<InsertParameters>
				<asp:Parameter Name="name" Type="String" />
				<asp:Parameter Name="minInstances" Type="Int32" />
				<asp:Parameter Name="maxLimit" Type="Int32" />
				<asp:Parameter Name="minInterval" Type="Object" />
			</InsertParameters>
		</asp:ObjectDataSource>
		<asp:ObjectDataSource ID="ProfilesGridViewDataSource" runat="server" 
			SelectMethod="GetProfileSettingsCollection" 
			TypeName="VioletDevelopmentLaboratory.Net.Web.Configuration.HealthMonitoringSectionManager"></asp:ObjectDataSource>
		<fieldset>
			<legend>profiles</legend>
			<asp:DetailsView ID="ProfilesDetailsView" runat="server" CellPadding="5" 
							AutoGenerateRows="False" DataKeyNames="Name" 
							DataSourceID="ProfilesDetailsViewDataSource" DefaultMode="Insert" 
							oniteminserted="ProfilesDetailsView_ItemInserted" 
							onitemupdated="ProfilesDetailsView_ItemUpdated" onitemdeleted="ProfilesDetailsView_ItemDeleted">
				<Fields>
					<asp:BoundField DataField="Name" HeaderText="Name" SortExpression="Name" 
						ReadOnly="True" />
					<asp:BoundField DataField="MinInstances" HeaderText="MinInstances" 
						SortExpression="MinInstances" />
					<asp:BoundField DataField="MaxLimit" HeaderText="MaxLimit" 
						SortExpression="MaxLimit" />
					<asp:BoundField DataField="MinInterval" HeaderText="MinInterval" 
						SortExpression="MinInterval" />
					<asp:CommandField ButtonType="Button" ShowDeleteButton="True" 
						ShowEditButton="True" ShowInsertButton="True" />
				</Fields>
			</asp:DetailsView>
			<asp:GridView ID="ProfilesGridView" runat="server" CellPadding="5" 
							AutoGenerateColumns="False" DataKeyNames="Name" 
							DataSourceID="ProfilesGridViewDataSource" 
							onselectedindexchanging="ProfilesGridView_SelectedIndexChanging">
				<Columns>
					<asp:CommandField ShowSelectButton="True" />
					<asp:BoundField DataField="Name" HeaderText="Name" SortExpression="Name" />
					<asp:BoundField DataField="MinInstances" HeaderText="MinInstances" 
						SortExpression="MinInstances" />
					<asp:BoundField DataField="MaxLimit" HeaderText="MaxLimit" 
						SortExpression="MaxLimit" />
					<asp:BoundField DataField="MinInterval" HeaderText="MinInterval" 
						SortExpression="MinInterval" />
				</Columns>
				<SelectedRowStyle BackColor="SkyBlue" />
			</asp:GridView>
		</fieldset>
	</div>


	<div style="margin-left : 30px">
		<asp:ObjectDataSource ID="RulesDetailsViewDataSource" runat="server" 
			DeleteMethod="RemoveRule" InsertMethod="AddRule" SelectMethod="GetRuleSettings" 
			TypeName="VioletDevelopmentLaboratory.Net.Web.Configuration.HealthMonitoringSectionManager" 
			UpdateMethod="ModifyRule">
			<DeleteParameters>
				<asp:Parameter Name="name" Type="String" />
			</DeleteParameters>
			<UpdateParameters>
				<asp:Parameter Name="name" Type="String" />
				<asp:Parameter Name="eventName" Type="String" />
				<asp:Parameter Name="provider" Type="String" />
				<asp:Parameter Name="profile" Type="String" />
				<asp:Parameter Name="minInstances" Type="Int32" />
				<asp:Parameter Name="maxLimit" Type="Int32" />
				<asp:Parameter Name="minInterval" Type="Object" />
				<asp:Parameter Name="custom" Type="String" />
			</UpdateParameters>
			<SelectParameters>
				<asp:ControlParameter ControlID="RulesGridView" Name="name" 
					PropertyName="SelectedValue" Type="String" />
			</SelectParameters>
			<InsertParameters>
				<asp:Parameter Name="name" Type="String" />
				<asp:Parameter Name="eventName" Type="String" />
				<asp:Parameter Name="provider" Type="String" />
				<asp:Parameter Name="profile" Type="String" />
				<asp:Parameter Name="minInstances" Type="Int32" />
				<asp:Parameter Name="maxLimit" Type="Int32" />
				<asp:Parameter Name="minInterval" Type="Object" />
				<asp:Parameter Name="custom" Type="String" />
			</InsertParameters>
		</asp:ObjectDataSource>
		<asp:ObjectDataSource ID="RulesGridViewDataSource" runat="server" 
			SelectMethod="GetRuleSettingsCollection" 
			TypeName="VioletDevelopmentLaboratory.Net.Web.Configuration.HealthMonitoringSectionManager"></asp:ObjectDataSource>
		<fieldset>
			<legend>rules</legend>
			<asp:DetailsView ID="RulesDetailsView" runat="server" CellPadding="5" 
				AutoGenerateRows="False" DataKeyNames="Name" 
				DataSourceID="RulesDetailsViewDataSource" DefaultMode="Insert" 
				oniteminserted="RulesDetailsView_ItemInserted" 
				onitemupdated="RulesDetailsView_ItemUpdated" 
				onitemdeleted="RulesDetailsView_ItemDeleted">
				<Fields>
					<asp:BoundField DataField="Name" HeaderText="Name" ReadOnly="True" 
						SortExpression="Name" />
					<asp:BoundField DataField="EventName" HeaderText="EventName" 
						SortExpression="EventName" />
					<asp:BoundField DataField="Custom" HeaderText="Custom" 
						SortExpression="Custom" />
					<asp:BoundField DataField="Profile" HeaderText="Profile" 
						SortExpression="Profile" />
					<asp:BoundField DataField="Provider" HeaderText="Provider" 
						SortExpression="Provider" />
					<asp:BoundField DataField="MinInstances" HeaderText="MinInstances" 
						SortExpression="MinInstances" />
					<asp:BoundField DataField="MaxLimit" HeaderText="MaxLimit" 
						SortExpression="MaxLimit" />
					<asp:BoundField DataField="MinInterval" HeaderText="MinInterval" 
						SortExpression="MinInterval" />
					<asp:CommandField ButtonType="Button" ShowDeleteButton="True" 
						ShowEditButton="True" ShowInsertButton="True" />
				</Fields>
			</asp:DetailsView>
			<asp:GridView ID="RulesGridView" runat="server" CellPadding="5" 
				AutoGenerateColumns="False" DataKeyNames="Name" 
				DataSourceID="RulesGridViewDataSource" 
				onselectedindexchanging="RulesGridView_SelectedIndexChanging">
				<Columns>
					<asp:CommandField ShowSelectButton="True" />
					<asp:BoundField DataField="Name" HeaderText="Name" ReadOnly="True" 
						SortExpression="Name" />
					<asp:BoundField DataField="EventName" HeaderText="EventName" 
						SortExpression="EventName" />
					<asp:BoundField DataField="Custom" HeaderText="Custom" 
						SortExpression="Custom" />
					<asp:BoundField DataField="Profile" HeaderText="Profile" 
						SortExpression="Profile" />
					<asp:BoundField DataField="Provider" HeaderText="Provider" 
						SortExpression="Provider" />
					<asp:BoundField DataField="MinInstances" HeaderText="MinInstances" 
						SortExpression="MinInstances" />
					<asp:BoundField DataField="MaxLimit" HeaderText="MaxLimit" 
						SortExpression="MaxLimit" />
					<asp:BoundField DataField="MinInterval" HeaderText="MinInterval" 
						SortExpression="MinInterval" />
				</Columns>
				<SelectedRowStyle BackColor="SkyBlue" />
			</asp:GridView>
		</fieldset>
	</div>
</asp:Content>